package demo;
class Student {
    String name;
    String gender;
    int age;

    public Student(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        System.out.println("构造方法执行啦！");
    }
    {
        System.out.println("实例代码块执行啦！");
    }
    static{
        System.out.println("静态代码块执行啦！");
    }
}
public class TestStudent{
    public static void main(String[] args) {
        Student student=new Student("张三","男",18);
    }
    //结果：先执行静态代码块 再是实例代码块 然后是构造方法
}
